package info.aquaball;

import info.aquaball.util.velocity.VelocityEngineManager;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;

@SuppressWarnings("serial")
public class Anmelde_PortalServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		PrintWriter out = resp.getWriter();
			resp.setContentType("text/html");
			
			VelocityContext context = new VelocityContext();
			Template t = new Template();

			VelocityEngineManager.init();
			t = VelocityEngineManager.getTemplate( "main_knownuser.html" );
			context.put("username", "No user logged on!");
			StringWriter writer = new StringWriter();
			t.merge( context, writer );
			out.println(writer.toString());
			out.flush();
		    out.close();

	}
}
